#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int n,a,sum = 0;
	scanf("%d%d", &n, &a);
	int c = a;
	for (int i = 1; i <= n; ++i)
	{
		sum += a;
		a *= 10;
		a += c;
	}
	printf("%d\n", sum);
	return 0;
}